import { get,post } from "@/api/http";

export const demo = () => get("/api/demo");
export const login = (data) => post("/api/login",data);//登录
export const loginOut = () => post("/api/loginOut");//退出登录
export const getArticleList = (data) => post("/api/article/lists",data);//文章列表
export const getUserInfo = () => post("/api/getUserInfo");

export const userList = (data) => post("/api/auth/user/list",data);
export const userAdd = (data) => post("/api/auth/user/add",data);
export const userDelete = (data) => post("/api/auth/user/delete",data);
export const userRoleList = (data) => post("/api/auth/user/userRoleList",data);
export const userRoleUpdate = (data) => post("/api/auth/user/userRoleUpdate",data);

export const roleList = (data) => post("/api/auth/role/list",data);
export const roleAdd = (data) => post("/api/auth/role/add",data);
export const roleDelete = (data) => post("/api/auth/role/delete",data);
export const roleEdit = (data) => post("/api/auth/role/edit",data);
export const roleUpdate = (data) => post("/api/auth/role/update",data);
export const getMenuByRole = (data) => post("/api/auth/role/getMenuByRole",data);
export const saveRoleMenu = (data) => post("/api/auth/role/saveRoleMenu",data);

export const menuList = (data) => post("/api/auth/permission/list",data);
export const menuListTree = () => post("/api/auth/permission/listTree");
export const menuAdd = (data) => post("/api/auth/permission/add",data);
export const menuDelete = (data) => post("/api/auth/permission/delete",data);
export const getFirstMenu = (data) => post("/api/auth/permission/getFirst",data);


